FROM docker.v2.aispeech.com/vertx/centos7.3-java8-tensorflow:flink
MAINTAINER kai.li

STOPSIGNAL SIGTERM

RUN rm -rf /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
ENV LC_ALL zh_CN.utf8

ENV FLINK_HOME /opt/flink
ENV ETCD_PROJECT_IDENTIFICATION /lasr/jobnode

COPY ./scripts /scripts

# We use the "sh -c" to turn around https://github.com/docker/docker/issues/5509 - variable not expanded
ENTRYPOINT ["sh", "-c"]
CMD ["$FLINK_HOME/bin/taskmanager.sh start-foreground"]
